using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;

namespace SoNerdy.Player {
    public class Migrations : DataMigrationImpl {
        public int Create() {
            SchemaBuilder.CreateTable("PlayerPartRecord", tbl => tbl
                .ContentPartRecord()
                .Column<string>("PlayerPartData", col=>col.Unlimited())                
            );
            
            ContentDefinitionManager.AlterPartDefinition("PlayerPart", prt => prt                
                .Attachable()
                );

            return 1;
        }
    }
}